<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta content="text/html;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta http-equiv ="Pragma" content = "no-cache"/>
	<meta http-equiv="Cache-Control" content="no cache" />
	<meta http-equiv="Expires" content="0" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
	<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<meta name="format-detection" content="telephone=no"/>
	<link href="../../plugins/pace/themes/pink/pace-theme-flash.css" rel="stylesheet"/>
	<script src="../../plugins/pace/pace.min.js"></script>
	<link href="../../plugins/contextMenu/jquery.contextMenu.min.css" rel="stylesheet"/>
	<link href="../../plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
	<link rel="stylesheet" href="../../plugins/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css"/>
	<link href="../../plugins/toastr/toastr.min.css" rel="stylesheet"/>
	<link rel="stylesheet" type="text/css" href="../../plugins/layui/css/layui.css" media="all"/>
	<script type="text/javascript" src="../../plugins/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="../../plugins/encrypt/jsencrypt.min.js"></script>
	<script src="../../plugins/contextMenu/jquery.contextMenu.min.js"></script>
	<script type="text/javascript" src="../../plugins/ztree/js/jquery.ztree.all.min.js"></script>
	<script src="../../plugins/toastr/toastr.min.js"></script>
	<link rel="stylesheet" type="text/css" href="../../css/fs.css?v=2.0.0" media="all"/>
	<script type="text/javascript" src="../../plugins/layui/layui.js"></script>
	<script type="text/javascript" src="../../plugins/frame/js/fsDict.js?v=2.0.0"></script>
	<script type="text/javascript" src="../../plugins/frame/js/fs.js?v=2.0.0"></script>
	<script type="text/javascript" src="../../plugins/frame/js/frame.js?v=2.0.0"></script>
</head>
<body>
<div class="layui-fluid">
	<div class="layui-row layui-col-space10">
		<div class="layui-col-md12">
    	<div class="layui-card">
  			<div class="layui-card-body">
					<div class="layui-form-query">
						<form class="layui-form" id="query_form">
							<div class="layui-form-item">
								<div class="layui-inline">
									<label class="layui-form-mid">id：</label>
									<div class="layui-input-inline" style="width: 100px;">
										<input type="tel" name="id" autocomplete="off" class="layui-input"/>
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-mid">名称：</label>
									<div class="layui-input-inline" style="width: 100px;">
										<input type="text" name="name" autocomplete="off" class="layui-input"/>
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-mid">时间：</label>
									<div class="layui-input-inline" style="">
										<input type="text" name="createDate" autocomplete="off" class="layui-input fsDate" dateRange="1" placeholder=" - "/>
									</div>
								</div>
								<div class="layui-inline">
									<div class="layui-input-inline">
										<button class="layui-btn" type="button" function="query"><i class="layui-icon">&#xe615;</i>查询</button>
									</div>
								</div>
							</div>
						</form>
					</div>
					<table id="fsDatagrid" lay-filter="fsDatagrid" class="fsDatagrid" height="full-108" toolbar="#toolbarDemo" title="1111111" defaultToolbar="filter,print,exports" isTotalRow="1" isLoad="1" url="/fsbus/DEMO1001" isPage="1" sortType="1" pageSize="10" defaultForm="query_form"></table>

	         <div class="fsDatagridCols">
						<p type="numbers" title="#"/>
						<p type="radio" totalRowText="合计:"/>
						<p field="id" title="ID" width="80"  sort="true" hide="false" totalRow="true"/>
						<p field="name" title="名称" width="100" sort="true" />
						<p field="type" title="类型" width="150" dict="type"/>
						<!-- <p field="city" title="城市" width="100" dict="city"/> -->
						<p field="state" title="状态" width="80" templet="#stateTpl"/>
						<p field="city" title="滑块" width="200" templet="#cityTpl"/>
						<p field="modifiedBy" title="评分" width="200" templet="#modifiedByTpl"/>
						<p field="city2" title="进度条" width="200" templet="#cityTpl2"/>
						<p field="sex" title="性别" width="80" />
						<p field="area1" title="省份" width="100" dict="area1"/>
						<p fixed="right" align="center" toolbar="#barDemo" title="操作" width="220"/>
					</div>

					<script type="text/html" id="stateTpl">
						<input type="checkbox" name="state" lay-skin="switch" disabled lay-text="开启|关闭" {{ d.state == 1 ? 'checked' : '' }}>
					</script>
					<script type="text/html" id="cityTpl">
						<input type="text" class="fsSlider" name="city" range="false" tips="KB" value="{{ d.city }}" min="10" max="60" disabled="true" showstep="true" step="10" theme="#FF5722">
					</script>
					<script type="text/html" id="cityTpl2">
						<div class="layui-progress layui-progress-big" lay-showpercent="true">
						  <div class="layui-progress-bar" lay-percent="{{ d.city ?d.city : 0 }}%"></div>
						</div>
					</script>
					<script type="text/html" id="modifiedByTpl">
						<input type="text" class="fsRate" name="modifiedBy" value="{{ d.modifiedBy }}" readonly="readonly" text="true">
					</script>
					<script type="text/html" id="toolbarDemo">
					  <div class="layui-btn-container">
							<button class="layui-btn layui-btn-sm" function="top" topUrl="views/datagrid/add.html" topWidth="800px" isMaximize="0" topHeight="600px" topTitle="新增demo">
							  <i class="layui-icon">&#xe654;</i>新增
							</button>
							<button class="layui-btn layui-btn-sm layui-btn-danger" function="submit" method="get" url="/fsbus/DEMO1003" isMutiDml="1" isConfirm="1" confirmMsg="是否确定删除选中的数据？" inputs="id:">
							  <i class="layui-icon">&#xe640;</i>批量删除
							</button>
							<button class="layui-btn layui-btn-sm" function="refresh">
							  <i class="layui-icon">&#x1002;</i>刷新
							</button>
							<button class="layui-btn layui-btn-sm" function="test">
							  <i class="layui-icon">&#xe756;</i>测试
							</button>
					  </div>
					</script>
					<script type="text/html" id="barDemo">
						<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="top" topUrl="views/datagrid/edit.html" topMode="readonly" topWidth="800px" topHeight="600px" topTitle="查看demo" inputs="id:">查看</a>
		 				<a class="layui-btn layui-btn-xs" lay-event="top" topUrl="views/datagrid/edit.html" topWidth="800px" topHeight="600px" topTitle="编辑demo" inputs="id:">编辑</a>
		  				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" url="/fsbus/DEMO1003" isConfirm="1" method="get" confirmMsg="是否确定删除当前记录？" inputs="id:">删除</a>
						<a class="layui-btn layui-btn-xs" lay-event="test2" >测试</a>
					</script>


				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
layui.fsButton.test2 = function(elem,data,datagrid,fsCommon){
	alert("测试自定义按钮2"+JSON.stringify(data));
}
</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?d506ef94f6ea5b1b6824728a5e476535";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>
